﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moonwish.Foundation.DataAccess.SqlServer;
using Moonwish.Foundation.DataEntity;

namespace Moonwish.Foundation.SqlServerDAL.Test
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            var vo = new ValueObjectClassDA();
            var item = new V_FDT_ValueObjectClass
                           {
                               ValueObjectClassId = Guid.NewGuid().ToString(),
                               Code = "123456",
                               Name = "班别",
                               OrderNo = 0,
                               DataStatus = "New",
                               Remark = "hello..."
                           };
            item.V_FDT_ValueObjects.Add(new V_FDT_ValueObject
                                            {
                                                ValueObjectId = Guid.NewGuid().ToString(),
                                                ValueObjectClassId = item.ValueObjectClassId,
                                                Code = "12345",
                                                Name = "甲班",
                                                OrderNo = 1,
                                                DataStatus = "New"
                                            });
            vo.Add(new List<V_FDT_ValueObjectClass>{item}, "default");
        }

        [TestMethod]
        public void AppModuleTest()
        {
            var item = new V_FDT_App()
                           {
                               Name = "基础模块",
                               XapName = "Moonwish.Foundation.Silverlight.xap",
                               InstallTime = DateTime.Now,
                               IsInternal = 1,
                               Author = "zhanglin",
                               Copyright = "OsAvatar"
                           };
            var da = new AppModuleDA();
            da.Add(new List<V_FDT_App> {item}, "default");
        }
    }
}
